/*
 * John Quinn
 * Lindsey Sansone
 * Robert Wirthman
 * location.cpp
 * 2/26/12
*/
#include <iostream>
#include "location.h"
using namespace std;
Location::Location(int a, int b)
{
  setX(a);
  setY(b);
}
int Location::getX() const
{
  return x;
}
int Location::getY() const
{
  return y;
}
void Location::setX(int a)
{
  if(a<0)
  {
    cout<<"The x-coordinate cannot be less than zero. It will default to zero."<<endl;
    x=0;
  }
  else
  {
    x=a;
  }
}
void Location::setY(int b)
{
  if(b<0)
  {
    cout<<"The y-coordinate cannot be less than zero. It will default to zero."<<endl;
    y=0;
  }
  else
  {
    y=b;
  }
}
